Ext.ns('Ext.ux.tree');

/**
 * Ext.ux.tree.SettingsTreeNode
 * @extends Ext.tree.TreeNode
 * Extended version of TreeNode which fires meaningful events when interacted with
 */
Ext.ux.tree.SettingsTreeNode = function(config) {
	var config = config || {};

	if (!config.id) {
		throw new Error("Each settings tree node must have an ID which matches the ID of a panel in the Settings app's SlidingCardLayout");
	}

	Ext.applyIf(config, {
				allowChildren	: false
			});

	Ext.ux.tree.SettingsTreeNode.superclass.constructor.call(this, config);
};
Ext.extend(Ext.ux.tree.SettingsTreeNode, Ext.tree.TreeNode);

Ext.reg('settings_treenode', Ext.ux.tree.SettingsTreeNode);